<template>
  <div class="doctorTeam">
    <!-- <el-button type="text" class="topButton" @click="topButton">{{!isShowMore?'展开':'收起'}}</el-button> -->
    <el-form :inline="true" :model="formInline" class="demo-form-inline" label-position="left">
      <el-form-item label="名称:">
        <el-text>{{formInline.doctor_name}}</el-text>
      </el-form-item>
      <el-form-item label="手机:">
        <el-text>{{formInline.doctor_mobile}}</el-text>
      </el-form-item>
      <el-form-item label="医院:">
        <el-text>{{formInline.hospital}}</el-text>
      </el-form-item>
   <!--   <el-form-item label="归属平台:">
        <el-text>111</el-text>
      </el-form-item>
      <el-form-item label="默认互联网医院:">
        <el-text>111</el-text>
      </el-form-item>
      <div v-if="isShowMore">
        <el-form-item label="医助姓名:">
          <el-text>111</el-text>
        </el-form-item>
        <el-form-item label="医助手机:">
          <el-text>111</el-text>
        </el-form-item>
        <el-form-item label="归属MCN:">
          <el-text>111</el-text>
        </el-form-item> 
      </div>-->
    </el-form>
  </div>
</template>

<script setup>
  import {ref,nextTick,onMounted,reactive} from 'vue'
  import {orderDoctorAss} from '/src/api/orderManage/recipeOrder'
  const formInline = ref({})
  const props = defineProps({
    prescriptionOrderId: { type: String }
  })
  const isShowMore = ref(false)
  const topButton = () => {
    isShowMore.value = !isShowMore.value
  }
  
  //订单信息
  const getOrderDoctorAss = async () => {
    try {
      const result = await orderDoctorAss({id:props.prescriptionOrderId})
      if (result.code == 200) {
        console.log('订单',result.data)
        formInline.value=result.data.doctor
        console.log('医生', result.data.doctor)
      }
    } catch (error) {
      console.error('获取列表时出错：', error)
    }
  }
  onMounted(() => {
    getOrderDoctorAss()
  });
</script>

<style lang="scss" scoped>
  .demo-form-inline {
    width: 100%;
    margin-top: 20px;
  }

  .demo-form-inline ::v-deep .el-form-item {
    width: 33.33%;
    font-weight: 300;
    margin-right: 0px !important;
    margin-bottom: 0 !important
  }

  ::v-deep .el-form-item__label {
    // width: 120px;
    color: rgba(0, 0, 0, .85)
  }

  .itemCol {
    width: 100% !important;
  }

  .topButton {
    display: flex;
    width: 100%;
    justify-content: flex-end;
  }
</style>